using System.Net.Sockets;
using System.Threading;

namespace SimpleSocket
{
    public sealed class Connection
    {
        public Connection(Socket socket)
        {
            this.Socket = socket;
        }

        public Socket Socket { get; }
        public bool Active { get; set; }
        public string RemoteIp { get; set; }
        public string LocalIp { get; set; }


        public bool SendAsync(SocketAsyncEventArgs e)
        {
            return this.Socket.SendAsync(e);
        }

        public bool ReceiveAsync(SocketAsyncEventArgs e)
        {
            return this.Socket.ReceiveAsync(e);
        }
    }
}